WOLF core
WOLF: A Modular Estimation Framework for Robotics
XXXXXXXXXXXXXXXXXXXXXXXXvoid(0)" frameborder="0" name="MSearchResults" id="MSearchResults">
wolf::ProcessorBase Class Referenceabstract

#include <core/processor/processor_base.h>

Inheritance diagram for wolf::ProcessorBase:
[legend]

Public Member Functions

void startCaptureProfiling ()
 
void stopCaptureProfiling ()
 
void startKFProfiling ()
 
void stopKFProfiling ()
 
virtual void printProfiling (std::ostream &stream=std::cout) const
 
 ProcessorBase (const std::string &_type, const TypeComposite &_state_types, const YAML::Node &_params)
 constructor More...
 
 ~ProcessorBase () override
 
virtual void configure (SensorBasePtr _sensor)=0
 
virtual void remove ()
 
bool hasChildren () const override
 
const TypeComposite & getStateTypes () const
 
StateKeys getStateKeys () const
 
unsigned int id () const
 
void keyFrameCallback (FrameBasePtr _keyframe)
 notify a new keyframe made by another processor More...
 
void captureCallback (CaptureBasePtr _capture)
 notify a new capture More...
 
SensorBaseConstPtr getSensor () const
 
SensorBasePtr getSensor ()
 
YAML::Node getParams () const
 
bool isMotionProvider () const
 
bool applyLossFunction () const
 
bool isVotingActive () const
 
double getTimeTolerance () const
 
void setApplyLossFunction (bool _apply_loss_function)
 
void setVotingActive (bool _voting_active)
 
void setTimeTolerance (double _time_tolerance)
 
void setDebugVerboseLevel (const std::string &_debug_verbose_level)
 
std::string getDebugVerboseLevel () const
 
bool checkTimeTolerance (const TimeStamp &_ts1, const TimeStamp &_ts2) const
 
bool checkTimeTolerance (const CaptureBasePtr _cap, const TimeStamp &_ts) const
 
bool checkTimeTolerance (const FrameBasePtr _frm, const TimeStamp &_ts) const
 
bool checkTimeTolerance (const FrameBasePtr _frm, const CaptureBasePtr _cap) const
 
virtual void link (SensorBasePtr) final
 
virtual void printHeader (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream, std::string _tabs="") const
 
void print (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream=std::cout, std::string _tabs="") const
 
virtual CheckLog localCheck (bool _verbose, std::ostream &_stream, std::string _tabs="") const
 
bool check (CheckLog &_log, bool _verbose, std::ostream &_stream, std::string _tabs="") const
 
- Public Member Functions inherited from wolf::NodeBase
 NodeBase (const std::string &_category, const std::string &_type="Undefined", const std::string &_name="")
 
virtual ~NodeBase ()=default
 
unsigned int nodeId () const
 
std::string getCategory () const
 
std::string getType () const
 
std::string getName () const
 
bool isRemoving () const
 
virtual bool hasChildren () const =0
 
void setType (const std::string &_type)
 
void setName (const std::string &_name)
 
ProblemConstPtr getProblem () const
 
ProblemPtr getProblem ()
 

Protected Member Functions

virtual void processCapture (CaptureBasePtr)=0
 process an incoming capture More...
 
virtual void processKeyFrame (FrameBasePtr _keyframe_ptr)=0
 process an incoming key-frame More...
 
virtual bool triggerInCapture (CaptureBasePtr) const =0
 trigger in capture More...
 
virtual bool triggerInKeyFrame (FrameBasePtr) const =0
 trigger in key-frame More...
 
virtual bool storeKeyFrame (FrameBasePtr)=0
 store key frame More...
 
virtual bool storeCapture (CaptureBasePtr)=0
 store capture More...
 
virtual bool voteForKeyFrame () const =0
 Vote for KeyFrame generation. More...
 
virtual bool permittedKeyFrame () const final
 
void setProblem (ProblemPtr) override
 
void addTypes (const TypeComposite &)
 add state types More...
 
virtual void setProblem (ProblemPtr _prob_ptr)
 

Protected Attributes

unsigned int processor_id_
 
YAML::Node params_
 
BufferFrame buffer_frame_
 
BufferCapture buffer_capture_
 
std::string debug_verbose_level_
 
- Protected Attributes inherited from wolf::NodeBase
ProblemWPtr problem_ptr_
 
unsigned int node_id_
 Node id. It is unique over the whole Wolf Tree. More...
 
std::string node_category_
 Text label identifying the category of node ("SENSOR", "FEATURE", etc) More...
 
std::string node_type_
 Text label identifying the type or subcategory of node ("Pin Hole", "Point 2d", etc) More...
 
std::string node_name_
 
bool is_removing_
 A flag for safely removing nodes from the Wolf tree. See remove(). More...
 

Constructor & Destructor Documentation

◆ ProcessorBase()

wolf::ProcessorBase::ProcessorBase ( const std::string &  _type,
const TypeComposite &  _state_types,
const YAML::Node &  _params 
)

constructor

Parameters
_typeTO BE HARDCODED IN THE DERIVED CLASS CONSTRUCTOR: type name
_state_typesTO BE HARDCODED IN THE DERIVED CLASS CONSTRUCTOR: The composite of state types of the frames created or used by this processor
_paramsparams yaml node

◆ ~ProcessorBase()

wolf::ProcessorBase::~ProcessorBase ( )
override

Member Function Documentation

◆ addTypes()

void wolf::ProcessorBase::addTypes ( const TypeComposite &  _state_types)
protected

add state types

This function adds the provided state types to the processor and problem (if set)

◆ applyLossFunction()

bool wolf::ProcessorBase::applyLossFunction ( ) const
inline

◆ captureCallback()

void wolf::ProcessorBase::captureCallback ( CaptureBasePtr  _capture)

notify a new capture

It stores the new capture in buffer_capture_ and calls triggerInCapture()

◆ check()

bool wolf::ProcessorBase::check ( CheckLog &  _log,
bool  _verbose,
std::ostream &  _stream,
std::string  _tabs = "" 
) const

◆ checkTimeTolerance() [1/4]

bool wolf::ProcessorBase::checkTimeTolerance ( const CaptureBasePtr  _cap,
const TimeStamp &  _ts 
) const

◆ checkTimeTolerance() [2/4]

bool wolf::ProcessorBase::checkTimeTolerance ( const FrameBasePtr  _frm,
const CaptureBasePtr  _cap 
) const

◆ checkTimeTolerance() [3/4]

bool wolf::ProcessorBase::checkTimeTolerance ( const FrameBasePtr  _frm,
const TimeStamp &  _ts 
) const

◆ checkTimeTolerance() [4/4]

bool wolf::ProcessorBase::checkTimeTolerance ( const TimeStamp &  _ts1,
const TimeStamp &  _ts2 
) const

◆ configure()

◆ getDebugVerboseLevel()

std::string wolf::ProcessorBase::getDebugVerboseLevel ( ) const
inline

◆ getParams()

YAML::Node wolf::ProcessorBase::getParams ( ) const
inline

◆ getSensor() [1/2]

SensorBasePtr wolf::ProcessorBase::getSensor ( )
inline

◆ getSensor() [2/2]

SensorBaseConstPtr wolf::ProcessorBase::getSensor ( ) const
inline

◆ getStateKeys()

StateKeys wolf::ProcessorBase::getStateKeys ( ) const
inline

◆ getStateTypes()

const TypeComposite & wolf::ProcessorBase::getStateTypes ( ) const
inline

◆ getTimeTolerance()

double wolf::ProcessorBase::getTimeTolerance ( ) const
inline

◆ hasChildren()

bool wolf::ProcessorBase::hasChildren ( ) const
inlineoverridevirtual

Implements wolf::NodeBase.

◆ id()

unsigned int wolf::ProcessorBase::id ( ) const
inline

◆ isMotionProvider()

bool wolf::ProcessorBase::isMotionProvider ( ) const
inline

◆ isVotingActive()

bool wolf::ProcessorBase::isVotingActive ( ) const
inline

◆ keyFrameCallback()

void wolf::ProcessorBase::keyFrameCallback ( FrameBasePtr  _keyframe)

notify a new keyframe made by another processor

It stores the new KF in buffer_frame_ and calls triggerInKF()

◆ link()

void wolf::ProcessorBase::link ( SensorBasePtr  _sen_ptr)
finalvirtual

◆ localCheck()

CheckLog wolf::ProcessorBase::localCheck ( bool  _verbose,
std::ostream &  _stream,
std::string  _tabs = "" 
) const
virtual

◆ permittedKeyFrame()

bool wolf::ProcessorBase::permittedKeyFrame ( ) const
finalprotectedvirtual

◆ print()

void wolf::ProcessorBase::print ( int  depth,
bool  factored_by,
bool  metric,
bool  state_blocks,
std::ostream &  stream = std::cout,
std::string  _tabs = "" 
) const

◆ printHeader()

void wolf::ProcessorBase::printHeader ( int  depth,
bool  factored_by,
bool  metric,
bool  state_blocks,
std::ostream &  stream,
std::string  _tabs = "" 
) const
virtual

◆ printProfiling()

void wolf::ProcessorBase::printProfiling ( std::ostream &  stream = std::cout) const
virtual

Reimplemented in wolf::ProcessorTracker.

◆ processCapture()

virtual void wolf::ProcessorBase::processCapture ( CaptureBasePtr  )
protectedpure virtual

process an incoming capture

Each derived processor should implement this function. It will be called if:

Implemented in wolf::ProcessorPose< DIM >, wolf::ProcessorFixedWingModel, wolf::ProcessorLoopClosure, wolf::ProcessorMotion, and wolf::ProcessorTracker.

◆ processKeyFrame()

virtual void wolf::ProcessorBase::processKeyFrame ( FrameBasePtr  _keyframe_ptr)
protectedpure virtual

process an incoming key-frame

Each derived processor should implement this function. It will be called if:

  • A new KF arrived and triggerInKF() returned true.

Implemented in wolf::ProcessorLoopClosure, wolf::ProcessorPose< DIM >, wolf::ProcessorFixedWingModel, wolf::ProcessorMotion, and wolf::ProcessorTracker.

◆ remove()

void wolf::ProcessorBase::remove ( )
virtual

◆ setApplyLossFunction()

void wolf::ProcessorBase::setApplyLossFunction ( bool  _apply_loss_function)
inline

◆ setDebugVerboseLevel()

void wolf::ProcessorBase::setDebugVerboseLevel ( const std::string &  _debug_verbose_level)
inline

◆ setProblem()

void wolf::ProcessorBase::setProblem ( ProblemPtr  _problem)
overrideprotectedvirtual

Reimplemented from wolf::NodeBase.

◆ setTimeTolerance()

void wolf::ProcessorBase::setTimeTolerance ( double  _time_tolerance)
inline

◆ setVotingActive()

void wolf::ProcessorBase::setVotingActive ( bool  _voting_active)
inline

◆ startCaptureProfiling()

void wolf::ProcessorBase::startCaptureProfiling ( )
inline

◆ startKFProfiling()

void wolf::ProcessorBase::startKFProfiling ( )
inline

◆ stopCaptureProfiling()

void wolf::ProcessorBase::stopCaptureProfiling ( )

◆ stopKFProfiling()

void wolf::ProcessorBase::stopKFProfiling ( )

◆ storeCapture()

virtual bool wolf::ProcessorBase::storeCapture ( CaptureBasePtr  )
protectedpure virtual

store capture

Returns true if the capture should be stored

Implemented in wolf::ProcessorLoopClosure, wolf::ProcessorPose< DIM >, wolf::ProcessorFixedWingModel, wolf::ProcessorMotion, and wolf::ProcessorTracker.

◆ storeKeyFrame()

virtual bool wolf::ProcessorBase::storeKeyFrame ( FrameBasePtr  )
protectedpure virtual

store key frame

Returns true if the key frame should be stored

Implemented in wolf::ProcessorLoopClosure, wolf::ProcessorPose< DIM >, wolf::ProcessorFixedWingModel, wolf::ProcessorMotion, and wolf::ProcessorTracker.

◆ triggerInCapture()

virtual bool wolf::ProcessorBase::triggerInCapture ( CaptureBasePtr  ) const
protectedpure virtual

trigger in capture

Returns true if processCapture() should be called after the provided capture arrived.

Implemented in wolf::ProcessorLoopClosure, wolf::ProcessorPose< DIM >, wolf::ProcessorFixedWingModel, wolf::ProcessorMotion, and wolf::ProcessorTracker.

◆ triggerInKeyFrame()

virtual bool wolf::ProcessorBase::triggerInKeyFrame ( FrameBasePtr  ) const
protectedpure virtual

trigger in key-frame

Returns true if processKeyFrame() should be called after the provided KF arrived.

Implemented in wolf::ProcessorLoopClosure, wolf::ProcessorPose< DIM >, wolf::ProcessorFixedWingModel, wolf::ProcessorMotion, and wolf::ProcessorTracker.

◆ voteForKeyFrame()

virtual bool wolf::ProcessorBase::voteForKeyFrame ( ) const
protectedpure virtual

Vote for KeyFrame generation.

If a KeyFrame criterion is validated, this function returns true, meaning that it wants to create a KeyFrame at the last Capture.

WARNING! This function only votes! It does not create KeyFrames!

Implemented in wolf::ProcessorFixedWingModel, wolf::ProcessorLandmarkExternal, wolf::ProcessorLoopClosure, wolf::ProcessorMotion, wolf::ProcessorOdom2d, wolf::ProcessorOdom3d, wolf::ProcessorPose< DIM >, wolf::ProcessorTracker, wolf::ProcessorTrackerFeature, and wolf::ProcessorTrackerLandmark.

Member Data Documentation

◆ buffer_capture_

BufferCapture wolf::ProcessorBase::buffer_capture_
protected

◆ buffer_frame_

BufferFrame wolf::ProcessorBase::buffer_frame_
protected

◆ debug_verbose_level_

std::string wolf::ProcessorBase::debug_verbose_level_
protected

◆ params_

YAML::Node wolf::ProcessorBase::params_
protected

◆ processor_id_

unsigned int wolf::ProcessorBase::processor_id_
protected

The documentation for this class was generated from the following files: